/*************************************************
 * File:    		SMFactory.h.cpp
 * Author:  	HouJiong <hou_jiong@163.com>
 * Brief:   		StoneMoneky project.
 *
 * Copyright (c) HouJiong
 *
 *************************************************/

/*
 * History:
 * =======================================
 * 2009-04-10 HouJiong <hou_jiong@163.com> created
 */
 
#ifndef _SMFACTORY_H_
#define _SMFACTORY_H_

#include "SMXMLDOM.h"
#include "SMView.h"

class SMFactory
{
public:
	SMFactory();
	static SMFactory *instance(){return SMFactory::m_instance;}
		
		SMXMLDOM *getSMXMLDOM()
		{
			if(!m_xmldom)
			{
					m_xmldom=new SMXMLDOM();
			}
			return m_xmldom;
		}
		
		SMView *getview()
		{
			if(!m_view)
			{
					m_view=new SMView(NULL);
			}
			return m_view;
		}



private:
	static SMFactory* m_instance;	
	static SMXMLDOM *m_xmldom;
	static SMView *m_view;

	
	
};

#endif //_SMFACTORY_H_

